home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / Developer Essentials Jul 90 / Programming / MPW Interfaces & Libraries 3.1 / AIncludes / ToolEqu.a < prev    next >
Encoding:
Text File  |  1989-10-13  |  33.2 KB  |  987 lines  |  [TEXT/MPS ]

  1. ; Version: 2.37
  2. ; Created: Wednesday, July 12, 1989 at 3:36:11 PM
  3. ;
  4. ; File: ToolEqu.a
  5. ;
  6. ; Assembler Interface to the Macintosh Libraries
  7. ; Copyright Apple Computer, Inc. 1984-1989
  8. ; All Rights Reserved
  9. ;
  10. ; Toolbox Equates -- This file defines the high-level equates for the
  11. ; Macintosh toolbox software. This is divided into two pieces for assembly
  12. ; space and speed considerations. The wholeTools flag is used to include
  13. ; the less common equates which realizes a complete set. The comments
  14. ; marked with ";+" denote managers.
  15. ;___________________________________________________________________________
  16.  
  17.                 IF            (&TYPE('wholeTools') = 'UNDEFINED') THEN
  18. wholeTools        EQU         1
  19.                 ENDIF
  20.  
  21.  
  22. ;+ Resource Manager
  23.  
  24. ; Resource attributes
  25.  
  26. resSysRef        EQU         7                        ; reference to system/local reference
  27. resSysHeap        EQU         6                        ; In system/in application heap
  28. resPurgeable    EQU         5                        ; Purgeable/not purgeable
  29. resLocked        EQU         4                        ; Locked/not locked
  30. resProtected    EQU         3                        ; Protected/not protected
  31. resPreload        EQU         2                        ; Read in at OpenResource?
  32. resChanged        EQU         1                        ; Existing resource changed since last update
  33. rcbMask         EQU         $FD                     ; Must preserve ResChanged over _ResAttrs
  34.  
  35. ; Map attributes
  36.  
  37. mapReadOnly     EQU         7                        ; is this file read-only?
  38. mapCompact        EQU         6                        ; Is a compact necessary?
  39. mapChanged        EQU         5                        ; Is it necessary to write map?
  40.  
  41. ; Resource Manager Globals
  42.  
  43. TopMapHndl        EQU         $A50                    ; topmost map in list [handle]
  44. SysMapHndl        EQU         $A54                    ; system map [handle]
  45. SysMap            EQU         $A58                    ; reference number of system map [word]
  46. CurMap            EQU         $A5A                    ; reference number of current map [word]
  47. ResReadOnly     EQU         $A5C                    ; Read only flag [word]
  48. ResLoad         EQU         $A5E                    ; Auto-load feature [word]
  49. ResErr            EQU         $A60                    ; Resource error code [word]
  50. ResErrProc        EQU         $AF2                    ; Resource error procedure [pointer]
  51. SysResName        EQU         $AD8                    ; Name of system resource file [STRING[19]]
  52.  
  53. ;new Resource Manager stuff
  54.  
  55. RomMapInsert    EQU         $B9E                    ; (byte) determines if we should link in map
  56. TmpResLoad        EQU         $B9F                    ; second byte is temporary ResLoad value.
  57.  
  58. ; the following word values are to be placed into the
  59. ; word located at RomMapInsert
  60.  
  61. mapTrue         EQU         $FFFF                    ; link in ROM map with resload true 
  62. mapFalse        EQU         $FF00                    ; link in ROM map with resload false
  63.  
  64. ;+ Font Manager
  65.  
  66.  
  67. ; Standard font ID's
  68.  
  69. sysFont         EQU         0                        ; system font ID
  70. applFont        EQU         1                        ; application font ID
  71. newYork         EQU         2                        ; standard release fonts
  72. geneva            EQU         3
  73. monaco            EQU         4
  74. venice            EQU         5
  75. london            EQU         6
  76. athens            EQU         7
  77. sanFran         EQU         8
  78. toronto         EQU         9
  79. cairo            EQU         11
  80. losAngeles        EQU         12
  81. times            EQU         20
  82. helvetica        EQU         21
  83. courier         EQU         22
  84. symbol            EQU         23
  85. mobile            EQU         24
  86.  
  87. ; Font Manager Globals
  88.  
  89. ApFontID        EQU         $984                    ; resource ID of application font [word]
  90. FMDefaultSize    EQU         $987                    ; default size [byte]
  91. CurFMInput        EQU         $988                    ; quickdraw FMInput Record [pointer]
  92. FMgrOutRec        EQU         $998                    ; quickdraw FontOutput Record [pointer]
  93. FScaleDisable    EQU         $A63                    ; disable font scaling? [byte]
  94.  
  95. ;new FONT manager stuff
  96.  
  97. WidthListHand    EQU         $8E4                    ; list of extra width tables, or nil.
  98. WidthPtr        EQU         $B10                    ; (long) Font Mgr global
  99. WidthTabHandle    EQU         $B2A                    ; Font width table handle for measure
  100. LastSPExtra     EQU         $B4C                    ; (long) most recent value of space extra
  101. SysFontFam        EQU         $BA6                    ; (word) System font family ID or zero
  102. SysFontSize     EQU         $BA8                    ; (word) System font size (or zero for 12 pt)
  103. FDevDisable     EQU         $BB3                    ; (byte) $FF to disable device-defined style extra
  104. LastFOND        EQU         $BC2                    ; (long) handle of last font def record
  105. FONDID            EQU         $BC6                    ; (word) ID of last font def record
  106. FractEnable     EQU         $BF4                    ; (byte) flag for fractional font widths
  107. UsedFWidths     EQU         $BF5                    ; (byte) flag saying if we used fract widths
  108. FScaleHFact     EQU         $BF6                    ; (long) horz. font scale factor
  109. FScaleVFact     EQU         $BFA                    ; (long) vertical font scale factor 
  110.  
  111. ;+ Window Manager
  112.  
  113. ; system windows have negative kinds
  114. dialogKind        EQU         2                        ; dialog windows
  115. userKind        EQU         8                        ; this and above numbers are for user
  116.  
  117. ; Values returned by window definition function's hit routine
  118.  
  119. wNoHit            EQU         0                        ; not in window at all
  120. wInContent        EQU         1                        ; in content area
  121. wInDrag         EQU         2                        ; in drag area
  122. wInGrow         EQU         3                        ; in grow area
  123. wInGoAway        EQU         4                        ; in go away area
  124. wInZoomIn        EQU         5                        ; in zoom in
  125. wInZoomOut        EQU         6                        ; in zoom out
  126.  
  127. ; FindWindow Return Codes
  128.  
  129. inDesk            EQU         0                        ; not in any window
  130. inMenuBar        EQU         1                        ; in the menu bar
  131. inSysWindow     EQU         2                        ; in a system window
  132. inContent        EQU         3                        ; in content area of user window
  133. inDrag            EQU         4                        ; in drag area of user window
  134. inGrow            EQU         5                        ; in grow area of user window
  135. inGoAway        EQU         6                        ; in go away area of user window
  136. inZoomIn        EQU         7                        ; in zoom in part code
  137. inZoomOut        EQU         8                        ; in zoom out part code
  138.  
  139. ; Resource ID's for windows
  140.  
  141. deskPatID        EQU         16                        ; desk pattern PAT ID
  142. documentProc    EQU         0                        ; standard document WDEF ID
  143. dBoxProc        EQU         1                        ; dialog box (document without titleBar) WDEF ID
  144. plainDBox        EQU         2                        ; no border WDEF ID
  145. altDBoxProc     EQU         3                        ; no shadow or title WDEF ID
  146. noGrowDocProc    EQU         4                        ; no grow area WDEF ID
  147. zoomDocProc     EQU         8                        ; with zoom box WDEF ID
  148. zoomNoGrow        EQU         12                        ; zoom with no grow box WDEF ID
  149. rDocProc        EQU         16                        ; document with rounded corners WDEF ID
  150.  
  151. ; Window Data Structure Definition
  152.  
  153. windowPort        EQU         0                        ; grafPort [108 bytes]
  154. windowKind        EQU         $6C                     ; type of window [word]
  155. wVisible        EQU         $6E                     ; visible flag [byte]
  156. wHilited        EQU         $6F                     ; select (hilite) flag [byte]
  157. wGoAway         EQU         $70                     ; has go away button [byte]
  158. wZoom            EQU         $71                     ; has zoom box [byte]
  159. structRgn        EQU         $72                     ; structure region of window [Handle]
  160. contRgn         EQU         $76                     ; content region of window [Handle]
  161. updateRgn        EQU         $7A                     ; update region of window [Handle]
  162. windowDef        EQU         $7E                     ; window definition procedure [Handle]
  163. wDataHandle     EQU         $82                     ; window proc-defined data [Handle]
  164. wTitleHandle    EQU         $86                     ; title string [Handle]
  165. wTitleWidth     EQU         $8A                     ; width in pixels of title string [word]
  166. wControlList    EQU         $8C                     ; control list of this window [handle]
  167. nextWindow        EQU         $90                     ; next window in z-ordered list [pointer]
  168. windowPic        EQU         $94                     ; picture handle for updates [handle]
  169. wRefCon         EQU         $98                     ; application use [long]
  170. windowSize        EQU         $9C                     ; size of window data structure
  171. WStateData        RECORD        0
  172. userState        DS.L        2                        ;Rect
  173. stdState        DS.L        2                        ;Rect
  174.                 ENDR
  175.  
  176.  
  177.  
  178. ; Window Manager Globals
  179.  
  180. WindowList        EQU         $9D6                    ; Z-ordered linked list of windows [pointer]
  181. PaintWhite        EQU         $9DC                    ; erase newly drawn windows? [word]
  182. WMgrPort        EQU         $9DE                    ; window manager's grafport [pointer]
  183. GrayRgn         EQU         $9EE                    ; rounded gray desk region [handle]
  184. CurActivate     EQU         $A64                    ; window slated for activate event [pointer]
  185. CurDeactive     EQU         $A68                    ; window slated for deactivate event [pointer]
  186. DragHook        EQU         $9F6                    ; user hook during dragging [pointer]
  187. DeskPattern     EQU         $A3C                    ; desk pattern [8 bytes]
  188. DeskHook        EQU         $A6C                    ; hook for painting the desk [pointer]
  189. GhostWindow     EQU         $A84                    ; window hidden from FrontWindow [pointer]
  190.  
  191.  
  192.  
  193. ;+ Menu Manager
  194.  
  195. ; "ASCII" marks for menu characters
  196.  
  197. noMark            EQU         0
  198. commandMark     EQU         $11                     ; command fan (cloverleaf)
  199. checkMark        EQU         $12                     ; check mark for menus
  200. diamondMark     EQU         $13                     ; diamond mark for menus
  201. appleMark        EQU         $14                     ; desk ornament menu title
  202.  
  203. ; MenuList Data Structure Definition -- one per menuBar
  204.  
  205. ; 6 Byte header
  206. lastMenu        EQU         0                        ; number of bytes in this menuList [word]
  207. lastRight        EQU         2                        ; h coordinate of 1st free point in menuBar [word]
  208. ; one of the following per menu
  209. menuoH            EQU         0                        ; menu handle [handle]
  210. menuLeft        EQU         4                        ; coordinate of left edge of menu [word]
  211.  
  212. ; MenuInfo Data Structure -- one per menu
  213.  
  214. menuID            EQU         0                        ; unique ID for each menuBar [word]
  215. menuWidth        EQU         2                        ; menu width [word]
  216. menuHeight        EQU         4                        ; menu height [word]
  217. menuDefHandle    EQU         6                        ; menu definition proc [handle]
  218. menuEnable        EQU         $A                        ; enable flags, one bit/item [long]
  219. menuData        EQU         $E                        ; menu item string [STRING]
  220. menuBlkSize     EQU         $E                        ; size of a menu block plus dataString
  221.  
  222. ; MenuString Data Structure -- one per menu item
  223.  
  224. itemIcon        EQU         0                        ; icon byte
  225. itemCmd         EQU         1                        ; apple (command key) byte
  226. itemMark        EQU         2                        ; checkmark character byte
  227. itemStyle        EQU         3                        ; style byte
  228.  
  229. ; Menu Manager Globals
  230.  
  231. MenuList        EQU         $A1C                    ; current menuBar list structure [handle]
  232. MenuFlash        EQU         $A24                    ; flash feedback count [word]
  233. MenuHook        EQU         $A30                    ; user hook during menuSelect [pointer]
  234. MBarEnable        EQU         $A20                    ; menuBar enable for desk accessories[word]
  235. MBarHook        EQU         $A2C                    ; user hook during menuSelect [pointer]
  236.  
  237. ;new Menu Manager stuff
  238.  
  239. MBarHeight        EQU         $BAA                    ; (word) height of menu bar (usually 20)
  240.  
  241. ;+ Control Manager
  242.  
  243. ; Part Codes
  244.  
  245. inButton        EQU         10                        ; in a push button
  246. inCheckBox        EQU         11                        ; in a checkBox button
  247. inUpButton        EQU         20                        ; in up button area of a dial
  248. inDownButton    EQU         21                        ; in down button area of a dial
  249. inPageUp        EQU         22                        ; in page up (gray) area of a dial
  250. inPageDown        EQU         23                        ; in page down (gray) area of a dial
  251. inThumb         EQU         129                     ; in thumb area of a dial
  252.  
  253. ; Constants for axis parameter of DragGrayRgn and DragControl
  254.  
  255. noConstraint    EQU         0                        ; free form dragging
  256. hAxisOnly        EQU         1                        ; horizontally only
  257. vAxisOnly        EQU         2                        ; vertically only
  258.  
  259. ; Resource ID's for controls
  260.  
  261. pushButProc     EQU         0                        ; rounded-corner pushButtons CDEF ID
  262. checkBoxProc    EQU         1                        ; check-box type buttons CDEF ID
  263. radioButProc    EQU         2                        ; radio buttons CDEF ID
  264. scrollBarProc    EQU         16                        ; scrollBar CDEF ID
  265. useWFont        EQU         8                        ; add this to get window font CDEF ID
  266. sBarPatID        EQU         17                        ; scrollBar pattern ID
  267.  
  268. ; Control Template
  269.  
  270. nextControl     EQU         $0                        ; next control in the list [handle]
  271. contrlOwner     EQU         $4                        ; owning window [pointer]
  272. contrlRect        EQU         $8                        ; bounding rectangle [8 bytes]
  273. contrlVis        EQU         $10                     ; visible state [byte]
  274. contrlHilite    EQU         $11                     ; hilite state [byte]
  275. contrlValue     EQU         $12                     ; current value of control [word]
  276. contrlMin        EQU         $14                     ; minimum value of control [word]
  277. contrlMax        EQU         $16                     ; maximum value of control [word]
  278. contrlDefHandle   EQU        $18                     ; control definition procedure [handle]
  279. contrlData        EQU         $1C                     ; data for definition proc [handle]
  280. contrlAction    EQU         $20                     ; local actionProc [pointer]
  281. contrlRFcon     EQU         $24                     ; refcon defined by application [long]
  282. contrlTitle     EQU         $28                     ; title string [STRING]
  283. contrlSize        EQU         $28                     ; size of control data structure less title
  284.  
  285. ; Control Manager Globals
  286.  
  287. DragPattern     EQU         $A34                    ; DragTheRgn pattern [8 bytes]
  288. DragFlag        EQU         $A44                    ; implicit parameter to DragControl [word]
  289. CurDragAction    EQU         $A46                    ; implicit actionProc for dragControl [pointer]
  290.  
  291.  
  292. ;+ Text Edit
  293.  
  294.  
  295. ; Justification styles
  296.  
  297. teJustLeft        EQU         0                        ; left justified text
  298. teJustRight     EQU         -1                        ; right justified text
  299. teJustCenter    EQU         1                        ; center justified text
  300. teForceLeft     EQU         -2                        ; for Arabic fonts, force left justification
  301.  
  302. ; Text Edit Record
  303.  
  304. teDestRect        EQU         $0                        ; destination rectangle [8 bytes]
  305. teViewRect        EQU         $8                        ; view rectangle rectangle [8 bytes]
  306. teSelRect        EQU         $10                     ; select rectangle [8 bytes]
  307. teLineHite        EQU         $18                     ; lineheight [word]
  308. teAscent        EQU         $1A                     ; first baseline offset [word]
  309. teSelPoint        EQU         $1C                     ; selection point [long]
  310. teSelStart        EQU         $20                     ; selection start [word]
  311. teSelEnd        EQU         $22                     ; selection end [word]
  312. teActive        EQU         $24                     ; active [byte]
  313. teWordBreak     EQU         $26                     ; word break routine [pointer]
  314. teClikProc        EQU         $2A                     ; click loop routine [pointer]
  315. teClikTime        EQU         $2E                     ; time of last click [long]
  316. teClikLoc        EQU         $32                     ; location of double click [long]
  317. teCarTime        EQU         $34                     ; time for next caret toggle [long]
  318. teCarOn         EQU         $38                     ; is caret on? [byte]
  319. teCarAct        EQU         $39                     ; is caret active? [byte]
  320. teJust            EQU         $3A                     ; fill style [word]
  321. teLength        EQU         $3C                     ; length of text below [word]
  322. teTextH         EQU         $3E                     ; text [handle]
  323. teRecBack        EQU         $42                     ; unused [word]
  324. teRecLine        EQU         $44                     ; unused [word]
  325. teLftClick        EQU         $46                     ; click was to left? [byte]
  326. teLftCaret        EQU         $47                     ; caret was to left? [byte]
  327. teCROnly        EQU         $48                     ; <CR> only for line breaks? [byte]
  328. teFontStuff     EQU         $4A                     ; space for font specifier [8 bytes]
  329. teFont            EQU         $4A                     ; text font [word]
  330. teFace            EQU         $4C                     ; text face [word]
  331. teMode            EQU         $4E                     ; text mode [word]
  332. teSize            EQU         $50                     ; text size [word]
  333. teGrafPort        EQU         $52                     ; grafport for editting [pointer]
  334. teHiHook        EQU         $56                     ; hook for hilite routine [pointer]
  335. teCarHook        EQU         $5A                     ; hook for hilite routine [pointer]
  336. teNLines        EQU         $5E                     ; number of lines [word]
  337. teLines         EQU         $60                     ; line starts [words...]
  338. teRecSize        EQU         $68                     ; base size of a record w/o lines
  339.  
  340. ; Text Edit Globals
  341.  
  342. TEScrpLength    EQU         $AB0                    ; textEdit Scrap Length [word]
  343. TEScrpHandle    EQU         $AB4                    ; textEdit Scrap [handle]
  344. TEWdBreak        EQU         $AF6                    ; default word break routine [pointer]
  345.  
  346. ;new TE stuff
  347.  
  348. WordRedraw        EQU         $BA5                    ; (byte) - used by TextEdit RecalDraw
  349. TESysJust        EQU         $BAC                    ; (word) system justification (intl. textEdit)
  350. TEFlags         EQU         teRecBack                ; turn whole byte into bit flags
  351. teFAutoPos        EQU         6                        ; set this bit for auto position/scroll
  352.  
  353. ;+ Dialog Manager
  354.  
  355. ; Item codes in item list
  356.  
  357. userItem        EQU         0                        ; application-defined (dialog only)
  358. ctrlItem        EQU         4                        ; must be added to following four items
  359. btnCtrl         EQU         0                        ; standard button
  360. chkCtrl         EQU         1                        ; standard check box
  361. radCtrl         EQU         2                        ; standard radio button
  362. resCtrl         EQU         3                        ; control defined in resource file
  363. statText        EQU         8                        ; static text
  364. editText        EQU         16                        ; editable text (dialog only)
  365. iconItem        EQU         32                        ; icon
  366. picItem         EQU         64                        ; quickdraw picture
  367. itemDisable     EQU         128                     ; add to any of above to disable
  368.  
  369.  
  370. ; Generic buttons
  371.  
  372. okButton        EQU         1                        ; OK button
  373. cancelButton    EQU         2                        ; Cancel button
  374.  
  375. ; Alert/Dialog Resource ID's
  376.  
  377. stopIcon        EQU         0                        ; stop icon ID
  378. noteIcon        EQU         1                        ; note icon ID
  379. cautionIcon     EQU         2                        ; caution icon ID
  380.  
  381. ; Dialog Template
  382.  
  383. dBounds         EQU         $0                        ; dialog bounds rectangle
  384. dWindProc        EQU         $8                        ; window proc ID
  385. dVisible        EQU         $A                        ; visible flag
  386. dGoAway         EQU         $C                        ; go away flag
  387. dRefCon         EQU         $E                        ; reference constant
  388. dItems            EQU         $12                     ; item list ID and handle
  389. dTitle            EQU         $14                     ; dialog window title
  390.  
  391. ; Alert Template
  392.  
  393. aBounds         EQU         $0                        ; alert box height and width
  394. aItems            EQU         $8                        ; item list ID
  395. aStages         EQU         $A                        ; stages word
  396.  
  397. ; Dialog/Alert Window Record
  398.  
  399. dWindow         EQU         $0                        ; window record
  400. items            EQU         $9C                     ; Item list [handle]
  401. teHandle        EQU         $A0                     ; textEdit object [handle]
  402. editField        EQU         $A4                     ; current field being edited [word]
  403. editOpen        EQU         $A6                     ; is editting open? [word]
  404. aDefItem        EQU         $A8                     ; default item for alerts [word]
  405. dWindLen        EQU         $AA                     ; dialog record length
  406.  
  407. ; In each item
  408.  
  409. itmHndl         EQU         0                        ; handle to the item
  410. itmRect         EQU         $4                        ; bounding rect of item
  411. itmType         EQU         $C                        ; item type
  412. itmData         EQU         $D                        ; item string, must be even length
  413.  
  414. ; Dialog Manager Globals
  415.  
  416. ANumber         EQU         $A98                    ; active alert ID [word]
  417. ACount            EQU         $A9A                    ; # times this alert called [word]
  418. DABeeper        EQU         $A9C                    ; beep routine [pointer]
  419. DAStrings        EQU         $AA0                    ; paramText substutution strings [4 handles]
  420. DlgFont         EQU         $AFA                    ; default dialog font ID [word]
  421.  
  422.  
  423. ;+ Package Globals
  424.  
  425.  
  426. AppPacks        EQU         $AB8                    ; packages' code [8 handles]
  427.  
  428.  
  429. ;+ Finder related Globals
  430.  
  431.  
  432. FinderName        EQU         $2E0                    ; "Finder" name [STRING[15]]
  433. AppParmHandle    EQU         $AEC                    ; handle to hold application parameters
  434.  
  435.  
  436. ;+ Miscellaneous Globals
  437.  
  438.  
  439. ApplScratch     EQU         $A78                    ; application scratch area [12 Bytes]
  440. ToolScratch     EQU         $9CE                    ; scratch area [8 bytes]
  441. TempRect        EQU         $9FA                    ; scratch rectangle [8 bytes]
  442.  
  443. ; System Patterns
  444.  
  445. sysPatListID    EQU         0                        ; ID of PAT# which contains 38 patterns
  446.  
  447.                 IF            wholeTools THEN
  448.  
  449. ; Resource Manager
  450.  
  451. mCCMask         EQU         $60                     ; mapCompact + mapChanged
  452. mChMask         EQU         $20                     ; mapChanged
  453. mCoMask         EQU         $40                     ; mapCompact
  454.  
  455. ; Font Manager
  456.  
  457. ; Font header values
  458.  
  459. propFont        EQU         $9000                    ; proportional font type
  460. prpFntH         EQU         $9001                    ; with height table
  461. prpFntW         EQU         $9002                    ; with width table
  462. prpFntHW        EQU         $9003                    ; with height & width table
  463. fixedFont        EQU         $B000                    ; fixed-pitch font type
  464. fxdFntH         EQU         $B001                    ; with height table
  465. fxdFntW         EQU         $B002                    ; with width table
  466. fxdFntHW        EQU         $B003                    ; with height & width table
  467. fontWid         EQU         $ACB0                    ; width-only font type
  468.  
  469. ; control/status codes for linkage w/font manager
  470.  
  471. fMgrCtl1        EQU         8                        ; printer drivers
  472.  
  473. ; Font Header Data Record
  474.  
  475. fFontType        EQU         0                        ; font type [word]
  476. fFirstChar        EQU         2                        ; ASCII code of first char [word]
  477. fLastChar        EQU         4                        ; ASCII code of last char [word]
  478. fWidMax         EQU         6                        ; maximum width of any char in pixels [word]
  479. fKernMax        EQU         8                        ; Negative of maximum character kern [word]
  480. fNDescent        EQU         10                        ; negative of descent [word]
  481. fFRectWidth     EQU         12                        ; width of font rectangle [word]
  482. fFRectHeight    EQU         14                        ; height of font rectangle [word]
  483. fOWTLoc         EQU         16                        ; offset to offset/width table [word]
  484. fAscent         EQU         18                        ; ascent above baseline in pixels [word]
  485. fDescent        EQU         20                        ; descent below baseline in pixels [word]
  486. fLeading        EQU         22                        ; space between lines in pixels [word]
  487. fRowWords        EQU         24                        ; row width of bit image / 2 [word]
  488.  
  489. ; Font Manager Input Record (CurFMInput)
  490.  
  491. fmInFamily        EQU         0                        ; family [word]
  492. fmInSize        EQU         2                        ; size [word]
  493. fmInFace        EQU         4                        ; face [word]
  494. fmInNeedBits    EQU         5                        ; needBits [byte]
  495. fmInDevice        EQU         6                        ; device number [byte]
  496. fmInNumer        EQU         8                        ; numerator of scale [fixed]
  497. fmInDenom        EQU         12                        ; denominator of scale [fixed]
  498.  
  499.  
  500. ; Font Manager Output record (FMgrOutRec)
  501.  
  502. fmOutError        EQU         0                        ; error code [word]
  503. fmOutFontH        EQU         2                        ; the actual font [handle]
  504. fmOutBold        EQU         6                        ; bolding factor [byte]
  505. fmOutItalic     EQU         7                        ; italic factor [byte]
  506. fmOutULOffset    EQU         8                        ; underline offset [byte]
  507. fmOutULShadow    EQU         9                        ; underline halo [byte]
  508. fmOutULThick    EQU         10                        ; underline thickness [byte]
  509. fmOutShadow     EQU         11                        ; shadow factor [byte]
  510. fmOutExtra        EQU         12                        ; extra horizontal width [byte]
  511. fmOutAscent     EQU         13                        ; height above baseline [byte]
  512. fmOutDescent    EQU         14                        ; height below baseline [byte]
  513. fmOutWidMax     EQU         15                        ; maximum width of character [byte]
  514. fmOutLeading    EQU         16                        ; space between lines [byte]
  515. fmOutNumer        EQU         18                        ; point for numerators of scale factor [long]
  516. fmOutDenom        EQU         22                        ; point for denominators of scale factor [long]
  517.  
  518.  
  519. ;WidthTable data structure
  520.  
  521. widTabData        EQU         0                        ;ARRAY[1..256] OF LONGINT character widths
  522. widTabFont        EQU         1024                    ;Handle font record used to build table
  523. widthSExtra     EQU         1028                    ;LONGINT space extra used for table
  524. widthStyle        EQU         1032                    ;LONGINT extra due to style
  525. widthFID        EQU         1036                    ;INTEGER font family ID
  526. widthFSize        EQU         1038                    ;INTEGER font size request
  527. widthFace        EQU         1040                    ;INTEGER style (face) request
  528. widthDevice     EQU         1042                    ;INTEGER device requested
  529. widthVInScale    EQU         1044                    ;FIXED scale factors requested
  530. widthHInScale    EQU         1048                    ;FIXED scale factors requested
  531. widthAFID        EQU         1052                    ;INTEGER actual font family ID for table
  532. widthFHand        EQU         1054                    ;Handle family record used to build up table
  533. widthUsedFam    EQU         1058                    ;BOOLEAN used fixed point family widths
  534. widthAFace        EQU         1059                    ;BYTE actual face produced
  535. widthVOutput    EQU         1060                    ;INTEGER vertical scale output value
  536. widthHOutput    EQU         1062                    ;INTEGER horizontal scale output value
  537. widthVFactor    EQU         1064                    ;INTEGER vertical scale output value
  538. widthHFactor    EQU         1066                    ;INTEGER horizontal scale output value
  539. widthASize        EQU         1068                    ;INTEGER actual size of actual font used
  540. widTabSize        EQU         1070                    ;INTEGER total size of table
  541.  
  542. ; Font Family Definition
  543.  
  544. ffFlags         EQU         0                        ; flags for family (word)
  545. ffFamID         EQU         2                        ; family ID number (word)
  546. ffFirst         EQU         4                        ; ASCII code of first character (word)
  547. ffLast            EQU         6                        ; ASCII code of last character (word)
  548. ffAscent        EQU         8                        ; maximum ascent expressed for 1 pt (word)
  549. ffDescent        EQU         10                        ; maximum descent expressed for 1 pt (word)
  550. ffLeading        EQU         12                        ; maximum leading expressed for 1 pt (word)
  551. ffWidMax        EQU         14                        ; maximum widMax expressed for 1 pt (word)
  552. ffWTabOff        EQU         16                        ; offset to width table (long)
  553. ffKernOff        EQU         20                        ; offset to kerning table (long)
  554. ffStylOff        EQU         24                        ; offset to style mapping table (long)
  555. ffProperty        EQU         28                        ; style property info (12 words)
  556. ffIntl            EQU         52                        ; reserved for international use (2 words)
  557. ffVersion        EQU         56                        ; FOND version number
  558.  
  559. ; Font Characterization Table
  560.  
  561. dpiVert         EQU         0                        ; vertical dots per inch [word]
  562. dpiHoriz        EQU         2                        ; horizontal dots per inch [word]
  563. boldChr         EQU         4                        ; bold characteristics [3 bytes]
  564. italChr         EQU         7                        ; italic characteristics [3 bytes]
  565. ; unused [3 bytes]
  566. outlineChr        EQU         13                        ; outline characteristics [3 bytes]
  567. shadowChr        EQU         16                        ; shadow characteristics [3 bytes]
  568. condChr         EQU         19                        ; condensed characteristics [3 bytes]
  569. extendChr        EQU         22                        ; extended characteristics [3 bytes]
  570. underChr        EQU         25                        ; underline characteristics [3 bytes]
  571.  
  572. ; Globals
  573.  
  574. CurFMFamily     EQU         $988                    ; current font family
  575. CurFMSize        EQU         $98A                    ; current font size
  576. CurFMFace        EQU         $98C                    ; current font face
  577. CurFMNeedBits    EQU         $98D                    ; boolean specifying whether it needs strike
  578. CurFMDevice     EQU         $98E                    ; current font device
  579. CurFMNumer        EQU         $990                    ; current numerator of scale factor
  580. CurFMDenom        EQU         $994                    ; current denominator of scale factor
  581. FOutRec         EQU         $998                    ; Font Manager output record
  582. FMDotsPerInch    EQU         $9B2                    ; h,v dotsPerInch of current device
  583. FMStyleTab        EQU         $9B6                    ; style heuristic table supplied by device
  584. RomFont0        EQU         $980                    ; system font [handle]
  585. GotStrike        EQU         $986                    ; Do we have the strike? [byte]
  586.  
  587.  
  588. ; Window Manager
  589.  
  590. ; Window Definition Procedure Messages
  591.  
  592. wDrawMsg        EQU         0                        ; draw yourself
  593. wHitMsg         EQU         1                        ; hit test
  594. wCalcRgnMsg     EQU         2                        ; recalculate your regions
  595. wInitMsg        EQU         3                        ; initialize yourself
  596. wDisposeMsg     EQU         4                        ; dispose any private data
  597. wGrowMsg        EQU         5                        ; drag out grow outline
  598. wGIconMsg        EQU         6                        ; draw the grow icon
  599. OldStructure    EQU         $9E6                    ; saved structure region [handle]
  600. OldContent        EQU         $9EA                    ; saved content region [handle]
  601. SaveVisRgn        EQU         $9F2                    ; temporarily saved visRegion [handle]
  602. CurDeKind        EQU         $A22                    ; window kind of deactivated window [word]
  603. SaveUpdate        EQU         $9DA                    ; Enable update accumulation? [word]
  604.  
  605. ; Menu Manager
  606.  
  607. ; Menu Definition Procedure Messages
  608.  
  609. mDrawMsg        EQU         0                        ; draw yourself
  610. mChooseMsg        EQU         1                        ; select an item
  611. mSizeMsg        EQU         2                        ; calculate your size
  612.  
  613. ; Menu Resource IDs
  614.  
  615. textMenuProc    EQU         0                        ; standard text menu MDEF ID
  616. TheMenu         EQU         $A26                    ; ID of hilited menu [word]
  617. SavedHandle     EQU         $A28                    ; saved bits under a menu [handle]
  618.  
  619. ;misc Menu stuff
  620.  
  621. MrMacHook        EQU         $A2C                    ; Mr. Macintosh hook [pointer]
  622.  
  623. ; Control manager
  624.  
  625. ; Control Definition Procedure Messages
  626.  
  627. drawCtlMsg        EQU         0                        ; draw message
  628. hitCtlMsg        EQU         1                        ; hit test message
  629. calcCtlMsg        EQU         2                        ; calc region message
  630. newCtlMsg        EQU         3                        ; init message
  631. dispCtlMsg        EQU         4                        ; dispose any private data message
  632. posCtlMsg        EQU         5                        ; adjust indicator position message
  633. thumbCtlMsg     EQU         6                        ; calculate rectangles for thumb dragging
  634. dragCtlMsg        EQU         7                        ; custom drag message
  635. trackCtlMsg     EQU         8                        ; track yourself message
  636. calcWholeCtlMsg   EQU        10                        ; calc whole region message
  637. calcThumbCtlMsg   EQU        11                        ; calc indicator region message
  638.  
  639.  
  640. ; Text Edit
  641.  
  642. TEDoText        EQU         $A70                    ; textEdit doText proc hook [pointer]
  643. TERecal         EQU         $A74                    ; textEdit recalText proc hook [pointer]
  644.  
  645. ;stage definition--packed 2 to a byte, 4 stages in a word
  646.  
  647. volBits         EQU         3                        ; number of beeps
  648. alBit            EQU         4                        ; alert bit (put up box this time?)
  649. okDismissal     EQU         8                        ; bit for OK/Cancel default in each stage
  650.  
  651. ; DialogList Data Structure Definitions
  652.  
  653. dlgMaxIndex     EQU         0                        ; maximum index (=items-1) stored here
  654.  
  655.  
  656. SaveProc        EQU         $A90                    ; address of Save failsafe procedure
  657. SaveSP            EQU         $A94                    ; Safe SP for restart or save
  658.  
  659. ; Package Manager
  660.  
  661. FPState         EQU         $A4A                    ; floating point state [6 bytes]
  662. App2Packs        EQU         $BC8                    ; $BC8-$BE7 eight more package handles
  663.  
  664. ; Resource Manager
  665.  
  666. RMGRPerm        EQU         $BA4                    ; (byte) - permission byte for OpenResFile
  667.  
  668. ; Miscellaneous Constants
  669.  
  670. screenRadius    EQU         $00100010                ; rounded corners for desk area
  671.  
  672. ; Miscellaneous Globals
  673.  
  674. IconBitmap        EQU         $A0E                    ; bitmap used for plotting things
  675. TaskLock        EQU         $A62                    ; re-entering SystemTask [byte]
  676. CloseOrnHook    EQU         $A88                    ; hook for closing desk ornaments
  677.  
  678. ;new MacApp stuff
  679.  
  680. MAErrProc        EQU         $BE8                    ; (long) MacApp error proc address
  681. MASuperTab        EQU         $BEC                    ; (long) handle to MacApp superclass table
  682.  
  683.  
  684. ;**************** NEW TOOL EQUATES ************
  685.  
  686. ; Font Manager
  687.  
  688. ; addition to FMgrOutRec (was unused)
  689.  
  690. fmOutCurStyle    EQU         17                        ;style algorthmically applied by QuickDraw
  691.  
  692. ;___________________________________________________________________________
  693. ;
  694. ; Window Manager
  695.  
  696. ; auxWinRec structure
  697.  
  698. awNext            EQU         $0                        ;next in chain [Handle]
  699. awOwner         EQU         $4                        ;owner ID [WindowPtr]
  700. awCTable        EQU         $8                        ;color table [CTabHandle]
  701. dialogCItem     EQU         $C                        ;handle to dialog manager structures [handle]
  702. awFlags         EQU         $10                     ;handle for Ernie [handle]
  703. awResrv         EQU         $14                     ;for expansion [longint]
  704. awRefCon        EQU         $18                     ;user constant [longint]
  705. auxWinSize        EQU         $1C                     ;size of record
  706. AuxWinHead        EQU         $0CD0                    ;[handle] Window Aux List head
  707.  
  708. ; Window Part Identifiers which correlate color table entries with window elements
  709.  
  710. wContentColor    EQU         0
  711. wFrameColor     EQU         1
  712. wTextColor        EQU         2
  713. wHiliteColor    EQU         3
  714. wTitleBarColor    EQU         4
  715.  
  716.  
  717. ;___________________________________________________________________________
  718. ;
  719. ; Control Manager
  720.  
  721. ; auxCtlRec structure
  722.  
  723. acNext            EQU         $0                        ;next in chain [AuxCtlHndl]
  724. acOwner         EQU         $4                        ;owner ID [ControlHandle]
  725. acCTable        EQU         $8                        ;color table [CCTabHandle]
  726. acFlags         EQU         $C                        ;misc flag byte [word]
  727. acReserved        EQU         $E                        ;for expansion [LONGINT]
  728. acRefCon        EQU         $12                     ;user constant [LONGINT]
  729. acSize            EQU         $16                     ;size of record
  730. AuxCtlHead        EQU         $0CD4                    ;[handle] Control Aux List head
  731.  
  732. ; Here are some equates for the colors of control parts
  733.  
  734. cFrameColor     EQU         0
  735. cBodyColor        EQU         1
  736. cTextColor        EQU         2
  737. cThumbColor     EQU         3
  738.  
  739. ;___________________________________________________________________________
  740. ;
  741. ; Menu Manager
  742.  
  743. MenuDisable     EQU         $0B54                    ; menuID and Item when disabled item selected
  744. MBDFHndl        EQU         $0B58                    ; handle to current menu bar defproc
  745. MBSaveLoc        EQU         $0B5C                    ; handle to the mbarproc private data
  746. MenuCInfo        EQU         $0D50                    ; hanel to menu color information table
  747. TopMenuItem     EQU         $A0A                    ; pixel value of top of scrollable menu
  748. AtMenuBottom    EQU         $A0C                    ; pixel value of bottom of scrollable menu
  749.  
  750. ;
  751. ; color menu table equates (mct = menu color table)
  752. ;
  753. mctID            EQU         $0
  754. mctItem         EQU         $2
  755. mctRGB1         EQU         $4
  756. mctRGB2         EQU         $A
  757. mctRGB3         EQU         $10
  758. mctRGB4         EQU         $16
  759. mctReserved     EQU         $1C
  760. mctEntrySize    EQU         $1E
  761.  
  762. ;
  763. ; miscellaneous equates for hierarchical menus
  764. ;
  765.  
  766. hMenuCmd        EQU         $1B                     ; itemCmd == $1B ==> hierarchical menu for this item
  767. scriptMenuCmd    EQU         28                        ; itemCmd == $1C ==> item to be displayed in script font
  768. hierMenu        EQU         -1                        ; InsertMenu(handle, hierMenu), when beforeID ==
  769. ; hierMenu, the handle is inserted in the
  770. ; hierarchical menuList
  771. mPopUpMsg        EQU         3                        ; menu defProc messages - place yourself
  772. ; miscellaneous hierarchical equates
  773. ;
  774. hMenuMark        EQU         200                     ; 'ยป' = menu character indicates item with hierarchical menu
  775.  
  776. ;
  777. ; miscellaneous menubar equates
  778. ;
  779. mbMenu1Loc        EQU         $A                        ; first menu is 10 pixels from left side of screen
  780. mctAllIds        EQU         -97                     ; search for all IDs for the given Item
  781.  
  782. ;
  783. ; color menu table search (and destroy) messages (mct = menu color table)
  784. ;
  785. mctAllItems     EQU         -98                     ; search for all Items for the given ID
  786. mctLastIDIndic    EQU         -99                     ; last entry in color table has this in ID field
  787.  
  788. ;___________________________________________________________________________
  789. ;
  790. ; Text Edit
  791.  
  792. ; Set/Replace style modes
  793.  
  794. fontBit         EQU         0                        ; set font
  795. faceBit         EQU         1                        ; set face
  796. sizeBit         EQU         2                        ; set size
  797. clrBit            EQU         3                        ; set color
  798. addSizeBit        EQU         4                        ; add size mode
  799. toglBit         EQU         5                        ;set faces in toggle mode
  800. ; TESetStyle/TEContinuousStyle modes
  801. doFont            EQU         $01
  802. doFace            EQU         2
  803. doSize            EQU         4
  804. doColor         EQU         8
  805. doAll            EQU         15                        ; set font/face/size/color
  806. addSize         EQU         16
  807. doToggle        EQU         32
  808. ; New internal dispatch table
  809. ; --offsets into TEDispatchRec
  810. EOLHook         EQU         0                        ; [ProcPtr] TEEOLHook
  811. DRAWHook        EQU         4                        ; [ProcPtr] TEWidthHook
  812. WIDTHHook        EQU         8                        ; [ProcPtr] TEDrawHook
  813. HITTESTHook     EQU         12                        ; [ProcPtr] TEHitTestHook
  814. newTEFlags        EQU         16
  815. ; --selectors for TECustomHook
  816. IntEOLHook        EQU         0
  817. IntDrawHook     EQU         1
  818. IntWidthHook    EQU         2
  819. IntHitTestHook    EQU         3
  820. intDispSize     EQU         20                        ; size of TEDispatchRec
  821. teDispatchH     EQU         teRecBack                ; new handle to internal dispatch record
  822.  
  823. ; handle to style record
  824.  
  825. teStylesH        EQU         $4A                     ; replaces teFont/teFace
  826.  
  827. ; offsets into TEStyleRec
  828.  
  829. nRuns            EQU         $0                        ; [INTEGER] # of entries in styleStarts array
  830. nStyles         EQU         $2                        ; [INTEGER] # of distinct styles
  831. styleTab        EQU         $4                        ; [STHandle] handle to distinct styles
  832. lhTab            EQU         $8                        ; [LHHandle] handle to line heights
  833. teRefCon        EQU         $C                        ; [LONGINT] reserved
  834. nullStyle        EQU         $10                     ; [NullStHandle] to style set at null selection
  835. runs            EQU         $14                     ; array of styles
  836.  
  837. ; offsets into NullStRec
  838.  
  839. teReserved        EQU         0                        ; [LONGINT] reserved for future expansion
  840. nullScrap        EQU         4                        ; [StScrpHandle] handle to scrap style table.
  841. nullStSize        EQU         8
  842.  
  843. ; offsets into StyleRun array
  844.  
  845. startChar        EQU         0                        ; [INTEGER] offset into text to start of style
  846. styleIndex        EQU         2                        ; [INTEGER] style index
  847. stStartSize     EQU         4                        ; size of a styleStarts entry
  848.  
  849. ; offsets into STElement
  850.  
  851. stCount         EQU         0                        ; [INTEGER] # of times this style is used
  852. stHeight        EQU         2                        ; [INTEGER] line height
  853. stAscent        EQU         4                        ; [INTEGER] ascent
  854. stFont            EQU         6                        ; [INTEGER] font
  855. stFace            EQU         8                        ; [Style] face
  856. stSize            EQU         10                        ; [INTEGER] size
  857. stColor         EQU         12                        ; [RGBColor] color
  858. stRecSize        EQU         18                        ; size of a teStylesRec
  859.  
  860. ; offsets into TextStyle
  861.  
  862. tsFont            EQU         0                        ; [INTEGER] font
  863. tsFace            EQU         2                        ; [Style] face
  864. tsSize            EQU         4                        ; [INTEGER] size
  865. tsColor         EQU         6                        ; [RGBColor] color
  866. styleSize        EQU         12                        ; size of a StylRec
  867.  
  868. ; offsets into StScrpRec
  869.  
  870. scrpNStyles     EQU         0                        ; [INTEGER] # of styles in scrap
  871. scrpStyleTab    EQU         2                        ; [ScrpSTTable] start of scrap styles array
  872.  
  873. ; offsets into scrpSTElement
  874.  
  875. scrpStartChar    EQU         0                        ; [LONGINT] char where this style starts
  876. scrpHeight        EQU         4                        ; [INTEGER] line height
  877. scrpAscent        EQU         6                        ; [INTEGER] ascent
  878. scrpFont        EQU         8                        ; [INTEGER] font
  879. scrpFace        EQU         10                        ; [Style] face
  880. scrpSize        EQU         12                        ; [INTEGER] size
  881. scrpColor        EQU         14                        ; [RGBColor] color
  882. scrpRecSize     EQU         20                        ; size of a scrap record
  883.  
  884.  
  885. ; Text Edit Selectors:
  886.  
  887. teStylPaste     EQU         0
  888. teSetStyle        EQU         1
  889. teReplaceStyle    EQU         2
  890. teGetStyle        EQU         3
  891. getStylHandle    EQU         4
  892. setStylHandle    EQU         5
  893. getStylScrap    EQU         6
  894. teStylInsert    EQU         7
  895. teGetPoint        EQU         8
  896. teGetHeight     EQU         9
  897. teContinuousStyle EQU        10
  898. setStyleScrap    EQU         11
  899. teCustomHook    EQU         12
  900. teNumStyles     EQU         13
  901.  
  902.                 MACRO
  903.                 _TEContinuousStyle
  904.                 MOVE.W        #teContinuousStyle,-(SP)
  905.                 DC.W        $A83D                    ; _TEDispatch
  906.                 ENDM
  907.  
  908.                 MACRO
  909.                 _SetStyleScrap
  910.                 MOVE.W        #setStyleScrap,-(SP)
  911.                 DC.W        $A83D                    ; _TEDispatch
  912.                 ENDM
  913.  
  914.                 MACRO
  915.                 _TECustomHook
  916.                 MOVE.W        #teCustomHook,-(SP)
  917.                 DC.W        $A83D                    ; _TEDispatch
  918.                 ENDM
  919.  
  920.                 MACRO
  921.                 _TENumStyles
  922.                 MOVE.W        #teNumStyles,-(SP)
  923.                 DC.W        $A83D                    ; _TEDispatch
  924.                 ENDM
  925.  
  926.                 MACRO
  927.                 _TEStylPaste
  928.                 MOVE.W        #teStylPaste,-(SP)
  929.                 DC.W        $A83D                    ; _TEDispatch
  930.                 ENDM
  931.  
  932.                 MACRO
  933.                 _TESetStyle
  934.                 MOVE.W        #teSetStyle,-(SP)
  935.                 DC.W        $A83D                    ; _TEDispatch
  936.                 ENDM
  937.  
  938.                 MACRO
  939.                 _TEReplaceStyle
  940.                 MOVE.W        #teReplaceStyle,-(SP)
  941.                 DC.W        $A83D                    ; _TEDispatch
  942.                 ENDM
  943.  
  944.                 MACRO
  945.                 _TEGetStyle
  946.                 MOVE.W        #teGetStyle,-(SP)
  947.                 DC.W        $A83D                    ; _TEDispatch
  948.                 ENDM
  949.  
  950.                 MACRO
  951.                 _GetStylHandle
  952.                 MOVE.W        #getStylHandle,-(SP)
  953.                 DC.W        $A83D                    ; _TEDispatch
  954.                 ENDM
  955.  
  956.                 MACRO
  957.                 _SetStylHandle
  958.                 MOVE.W        #setStylHandle,-(SP)
  959.                 DC.W        $A83D                    ; _TEDispatch
  960.                 ENDM
  961.  
  962.                 MACRO
  963.                 _GetStylScrap
  964.                 MOVE.W        #getStylScrap,-(SP)
  965.                 DC.W        $A83D                    ; _TEDispatch
  966.                 ENDM
  967.  
  968.                 MACRO
  969.                 _TEStylInsert
  970.                 MOVE.W        #teStylInsert,-(SP)
  971.                 DC.W        $A83D                    ; _TEDispatch
  972.                 ENDM
  973.  
  974.                 MACRO
  975.                 _TEGetPoint
  976.                 MOVE.W        #teGetPoint,-(SP)
  977.                 DC.W        $A83D                    ; _TEDispatch
  978.                 ENDM
  979.  
  980.                 MACRO
  981.                 _TEGetHeight
  982.                 MOVE.W        #teGetHeight,-(SP)
  983.                 DC.W        $A83D                    ; _TEDispatch
  984.                 ENDM
  985.  
  986.                 ENDIF
  987.